//**********************************************************************************
//GMCProj33.java
//
//Name: Gabriel Martins	de	Castro
//Class:	COMSC	110L.51
//Date: 10/08/2014
//Instructor: Dr.	Chunyan Bai
//
//Purpose: Proejct 3 Exercise 3 (Verify if three pairs of points can represent a triangle) 
//***********************************************************************************

import java.util.Scanner;
//Class
public class GMCProj33
{
	public static void main(String[]	args)//main	method
	{
      
      System.out.print("Enter three pair of points to verify if it could represent a trinagule: \nPoint 1 :");
      Scanner input = new Scanner(System.in);
      int  x1 = input.nextInt();
      int  y1 = input.nextInt();
      System.out.print("Point 2 :");
      int  x2 = input.nextInt();
      int  y2 = input.nextInt();
      System.out.print("Point 3 :");
      int  x3 = input.nextInt();
      int  y3 = input.nextInt();
      
      double distanceAB = Math.sqrt(Math.pow((x1-x2),2) + Math.pow((y1-y2),2));
      double distanceAC = Math.sqrt(Math.pow((x1-x3),2) + Math.pow((y1-y3),2));
      double distanceBC = Math.sqrt(Math.pow((x2-x3),2) + Math.pow((y2-y3),2));
      
      if((distanceAB+distanceAC > distanceBC) && (distanceBC+distanceAC > distanceAB) && (distanceAB+distanceBC > distanceAC))
         System.out.println("They could represent the sides of a triangle");
      else
         System.out.println("They could not represent the sides of a triangle");
     
   }
}